#ifndef __RESPONSE_H__
#define __RESPONSE_H__

typedef struct Response {
    int status;
    size_t content_length;
    int sent;
    Chain *out;
    Chain *chain;
}Response;


int RES_CreateResponse(Conn *c);
void SetHttpStatus(Conn *c, int status);
void SetContentLength(Conn *c, size_t length);
int SendHttpHeader(Conn *c);
int AppendResponseBuf(Conn *c, char *buf, int leng);
int AppendResponseFile(Conn *c, int fd, int offset);
void SendHttpBody(Conn *c, int mode);


#endif

